Add syntax check after fix to prevent breaking code (writing to file)

Poor man's version but still...