misc style improvements, improve error reporting line/char info