Fixed file-deletion issue