added slack helper and debugging messages in middleware