add further raiseerrors to train