Update main.py

Use the modules playmode and appexceptions.