files handling refactoring #20
update changes