do not execute c++filt when it isn't needed
fix typos
remove unused old codes
add error check