Better error reporting and better stability