Added files migrate test and fixed files migration