fix scope_name can't distinguish file type,
and don't deal with plain text