add pic_intern_str
change interface of format functions
refactor import_table
report errors when import_table raised an error