Better error handling / tracking. Not even remotely finished. #406