completed basic file interface