write request to file only in debug mode