further improvements, moved tap output stream to separate module