Add trap for erroroneous input