Added some exception throwing from Server.php if invalid arguments