Improved working with files was made