Fixed resintall files check logic