Add woking directory config, some other changes