The court before whom the writ is returned, immediately after the return or within five days thereafter, must proceed to hear and examine the return, and such other matters as may be properly submitted for its consideration.