Function for first run sync