handle exception on startup by exiting.