Fix handle leak in rebuildJournal and add rename check