Surround update in try-catch to prevent network problems etc. from crashing the worker.
Fix indentation.