add logic for work with file