Added alarms to cleanly exit on unpredicted hangs