Fix for not having to read through the entire file on startup of input.
Removed a debug message
Let socket library return correct socket number in all cases.