added error logging for jobs