Corrected syntax errors
Enhanced error reporting