Fixed the bug that a new document is saved as "Untitled.txt" without asking to user.