handle exception when server not running