now with timestamp logging
moved door functions into door file and added an alarm on failure