Check connection before starting server