Prevent crash when port file does not exist
Merge branch 'fixconnectfail'