Partially working reference solution - file system rewrite is NOT yet complete