added a check if the server is available