fixed __log piping and added __is_stdin