Updated file alarmF.py

Email error handling and tidy file access