import hashlib


def file_get_md5_checksum(path, block_size= 2 ** 20):
	"""Returns MD% checksum for given file."""
	# Function source originally from : https://gist.github.com/juusimaa/5846242.
	md5 = hashlib.md5()
	try:
		file = open(path, 'rb')
		while True:
			data = file.read(block_size)
			if not data:
				break
			md5.update(data)
	except IOError:
		print('File \'' + path + '\' not found!')
		return None
	except:
		return None
	return md5.hexdigest()