add log handler to print to output