added general logging and debugging interface