adds basic file handling mechanism