Added cleanup for when we hit EOF in an interactive session.
added missing 'else'