Fixed tools.py permissions error