Update logging to include better trances and debugging information