Added frunctions to check for local data. Still need to read, interpert and update the files to the database.