Run class file only when no error with compilation