Fixed functions order to fix user and permissions on logging directory
before stopping GHTTPS service