adds safeguard for deleting files that dont exsist