Implemented initial database writing on import.