add file method