fix(system): rework WriteFile to take a relative path