Fix #208, handle file saving cancellation properly