Updated to un-comment diagnostic print edits and reverting to tail.
Updated to re-introduce tail to strip off diagnostic edits.