fix logging stdout to a file

Change-Id: If5d62e7d85f896a8e7fda6fc98eef7578edd5576