Improve messages

changes to exception text and change print statements to use logging