Change STATE to OLD_STATE in the status file
Add debugging message for update_state
Changed logging format
Shorten up case statements
Require atleast bash 4
Log warning before handling
Fix email notifications
Fixed default email notification settings