Added logging for merging process