some stuff moved to filesystem.py