Cleaned up code that wrote dbPort to yaml file