Now extensively using alerts
Better handling for state_changed_alert
More robust read implementation in FileWrapper