apache setup fix
bugfix
Fix assorted PEP issues, better port file handling
Change port file handling from try-catch to if-else