properly use cwd