Remove debug echos, tweak error handling.