fixed: can't open txt file because typo if condition.