partly finish working with files