minor fixes
write configs and environment