Error handling and timers improved