Add better loggging