build script and file functionality