Implement sync on application launch

Signed-off-by: Andrey Zhdanov <andrjufka@gmail.com>