added .mem file line count for more detailed error messages