Add support for handler object in options rather than just file/class