Extract out hash computation and add a file verification checker.