fix load overwriting bug and clean up output