fixed bug that prevent cancelling file saving