added error logging for worker