Add new arguments/options such as the cetificate usage and enhanced the thread feature and some output fixes during errors and debug as well