modified code of check device browser file