core file cleanup