Don't close(0) in SOS - it closes the console, too.