add a bit of error handling
add a bit of error handling

jm66/jm-wordcount,steve98654/pycon-tutorial-steve98564,lifan0127/2016-pycon-tutorial-project,jwarner308/pycon-tutorial-JW,kojoidrissa/pycon-tutorial-cbtd,terryjbates/pycon-tutorial-tbates,lif3isg0od/pycon-tutorial-learn,johnmulder/pycon-tutorial-student,steve98654/pycon-tutorial-steve98564,bazfire/satarvo_project,0x41/pycon_tut_phil,erinhaswell/pycon-tutorial-project-haswell,janecofino/pycon-tutorial-mjc,hrjn/2016-pycon_project,sk8asd123/oncyp,jdcorless/pycon-tutorial-jdcorless,steve98654/pycon-tutorial-steve98564