Adding logging to catch all possible Exceptions