Update to output file name

using time stamp on file name as a unique identifier to easily establish
file order.
fixed some minor bugs.