Adding logging to scheduled task