Fixed new file not respecting Cancel option in Confirm Discard dialog.