Add while loop to wait for server to start