Added option to disable text output and control threshold