Better error logging for worker processes