*fixed issue when calling gateway from commandline outside of public folder as when using cronjobs, etc