Unnecessary file is deleted