Added .log files
Log module and logging
Only set port when changed