check if stdout is defined