Added reading commands from log file.
To use it set port number to any negative number.