Added rudimentary error checking.
Added *.jpg files to .gitignore