Added a rescue to the end of the log command to prevent it from crashing
the app