Move md5 check outside download check