added import os
tweaked app.py