Better error messages

Redirect with error instead of echoing out the error.