add skip empty line and fix handling error