Use transaction to remove a file