Log exception in scheduler in addition to passing it to the caller.
Code Styling changes.