Fixes to actually keep files created in loop mode