Update main.py

implemented aps entries per file limit