wrapped database logging in a try block
wrapped email function in try block, and allowed custom subjects
made monitor.py wait a minute between checks