added a simple logging mechanism