improved testability, can pass ioloop via module global config