Improved error handling, fixed missing data issue

Fixes https://github.com/CloudyKangaroo/cloudykangaroo/issues/98
Merge pull request #2 from johann8384/ISSUE98

Improved error handling, fixed missing data issue
Merge pull request #100 from Contegix/master

Fixed Issue 98