added check in flask for almlogic.py running