Changed the header for the script and provided more info for Error cases

This shouldn't be echo'd