added a basic logging functionality