Added logging, alarm support.