Better error outputs, port handling