improve error handling, use existing package shasum