Fix err printing and some err