add basic logging

(need more sophisticated mechanism)