Add debug logger and fix updater bug