Added keystore
Fixed bugs that may occur during startup