add check for directory creation core/config

pass environment