Fixed RealVault implementation and added some debug logging