If any person on whom such writ is served shall, in disobedience to such writ, fail to bring the body of the petitioner, with a return of the cause of his detention, before the court or judge before whom the writ is returnable, for three days after such service, he shall forfeit to the petitioner $300.