added error messages to script output