Improved logging setup, added sync command