Added capture of error messages in M3 model.