Making build script safer