Added condition to send test email: if command != 'stop'