smarter error handling, get rid of logs