Bugfix: message writing now works again
Handle message file writing exception