Added extra checks to determine if server is running