multiple fixes to builder allow it to finish writing the loadfile