return error with failed exit