Some improvements

Added lager, fix plugin initialization (crash when plugins fail to initialize).