add basic logging code