Use hashlib. md5 module is deprecated. Also fix the md5 comparison