The person in possession of such premises, or any person claiming possession thereof, may, at or before the time appointed in the summons for showing cause, file an affidavit with the magistrate who issued the same, denying the facts upon which the summons was issued; and the matters thus controverted may be tried by the magistrate.