Adding try/except

Checksum now printed before dump

Added check due to type error