Error print format and fix position calculation