Changed server and error checking