added error-handling to jobs