Merge pull request #2 from evmarkov/master

Release builds
Basic error cases handling

Error cases handling is basically improved to especially handle more
NULLPTR cases according to comments fro Max.