updated err message method - fixed exception