replace some sys.err log with exception