Adding logging to some scripts