Added rank to logging output.