update source type analysis
fix bugs and add Check