rebuild script writes input out into a file for later reproducibility