Error trap input

Closes #3