Active data files

Added badly-designed but functional active data file locking.