improved error messages and removed any file paths from them.