prevent segv when env is empty
fix segv in config file creation
0.3.7