minor change to writePage in HeapFile