It is possible to add check file size in the destructor method. In case the size was greater than zero, a remove query with the file id could be performed. I will take note of this issue.