fixes for file I/O version that only deletes leaf pages