Add 'Check' functions and use it in main analyze block