Export a single require function that takes a path and an error handler