Fixed a bug on flavor sync. Moved the flavor sync. before the instance sync.
So the flavor sync. won't hang and be ready when instance sync. begins.
Also added more logs for easy debugging in the future.

Change-Id: I5f743c79b83022538e47a9f408b80c31d1b7b512
Closes-Bug: #1329652