Added logging option. Refs #24