Maybe here would be a good idea not fail, in case the command injection, there is a shell but the cleaning failed. I think it's a good situation for just a print_error.