Fixed check file bug