correct file and line for mage errors