Add ca cert file argument
Merge
Small cleanups after merge:

rename getEnv to env and add ca-cert flag.