#71 catch any exceptions if happen when righting to log file