Small refactoring in build script