Added error test and startServer() function.