fix bug cancelling new file