use pt style code for vsfshell_input_thread and fix some bugs