Added logging and worked on server