Fixed bug for existing files.