Beginning of rebuilding of the importFile function to work with the
database