Better checking
Added debug to image
Merge pull request #12 from GrygrFlzr/master

Added variable checking