allow change cwd and build improvements