log to log dir, cfg to cfg dir