Fixes #10 Add md5 check integrity
Merge remote-tracking branch 'upstream/master' into add-md5-checking
Fixes #10 Refactor the handler method

Extract some logic from the main function.
Reorganize the exceptions catches.
Merge pull request #11 from alexgt9/add-md5-checking

Fixes #10 Add md5 check integrity