fix stupid rm that removed files before they could be used, ref issue #1