Added text input option and some basic error handling