replace sysdir with chfdir