better error handling on duplicate hash
Merge pull request #4 from maquessime/master-issue-1

better error handling on duplicate hash