Added shared state model for testing

Also, added better printout of error message when reading
of a model fails.