Improved error messages in runtime