improvements (closing on error or EOF at STDIN)