delete file
handle arbitary depth input