Ensure input closes even on error returns, add usage/error messages.