safe version of mrlocs.py