Added logging for actions, errors, etc. Fully customizable.