Retain the original file name so errors can be generated properly.

We should hold onto the original file so we can generate a error message
when the file is not found.

Fixes #2990
Closes #3011