#123 Added shared context and additional logging