Close source file before delete.