add better error handling + refactor
Merge branch 'master' of github.com:philippotto/SmartExtractor