Improved work with files