added private networking and secret-file support