Fixed typo.
Fixed issue with partial port file

Fixed issue where the port file exists, but doesn't contain a valid port
number yet.