CLI to accept ctrl-D

Fix bug 1 (CLI to accept ctrl-D)