check file not nil