Fix try catch in HeapFile