Added logging to stdout and sample index action