Added error handling. Added option for thumbnail generation.
Merge branch 'master' of https://github.com/pkubiak/code-lab