Missed a spot for closing file handle fd in function get_sha1.