Moved watchdog calls so that logs are not generated unless email is actually sent.