better error handling and updates from fbukevin

better error handling when ctrl-c is sent as well