included basic error handling and fixed whitespace problem.
Merge branch 'master' of https://github.com/rc678/Ruby-practice

Merging branches