complete method CheckFile