original version of file registry.py