Delay reading file until listener is attached.