update IsFileExist method.