fix bug with files