changed working with files