Add version number and version pid to output.
Updated script