Uses portable end of line instead of \n in error message
Print error messages on stdandard error instead of standard output
Improved option -x support

Print an error message when the command doesn't exist
Exit with an error code instead of 0