make worker more robust for errors

If a worker raises an exception, it will freeze. Instead, log exceptions and
continue.