fix file state
NameError app.py suggested
