Save database in file