Small changes and moved message into exception block