Debugging WriteIPToFile on the server side. Fixed multiple bugs, should be runnable.