finished library and cdv to heapfile