Continued adding to the logging system
Changed logging again and fixed the close connection stuff on the server