Add exception checker
fix bug in print red error