Fix getting md5 and file extension