Optimize initial sync. Create db file if not exist.