Fix remove bug when removing gcode only files