added support for custom handlers to -t option