removed unnecessary closure of stdin reported by Frederic Chardon, thx