Changed error message settings and refactored a test file