Replace md5 library with hashlib.md5