Fixed a few bugs, added more logging.

Fixed timestamp bug, and streamstate issue missed in unittests.
Added more logging for pipeline manager.