Adding storing data to file and structure for DB