top.py - add file check and return empty dict.