Append timestamp to stdout and stderr logs and config flags

credit to nirmalc for this code. originally opened in PR#333