model.py: minor changes for errors output