Add support for closure as optional parameter of method `load`.