Added basic logging functionality.