added a recover_once function to debug on error, but just once