In the case where the program is executed by a daemon running in the background the terminal might not have a tty. The '(null)' is confusing.