added generic importFile function