Added logging option