added error logging to return exits