Simplified the flow in build.rs