Add log for handle migration and raise an error if unknown migration