Fixed bug, need to check the file is not exists at the first
Add test