Section 48. If at the time and place so appointed a witness or a person interested appears and objects, the justices or notaries shall not take the deposition unless upon hearing the parties they shall find that such testimony may be material to the petitioner and, except when the witness himself is petitioner, that it is not sought for the purpose of discovery or of using it in an action then pending or thereafter to be brought against said witness, and that the petitioner is in danger of losing the same before it can be taken in any action wherein his right, title, interest or claim can be tried. In all cases the petitioner, his agent or attorney shall, at the request of such witness or of a person interested, be examined on oath relative to his reasons for taking the deposition.