added basic file control and intervention

introduced some bugs too ...