add dir to ex message
fix bugs in build script