fixed illegal position exception bug
print echo to terminal