Updated migration procedure, to correctly manage errors, and to return a BOOL as result of the operation