Revert "changed error message for invalid filename as per #534"

This reverts commit 83e4a410304b779281f53320a862921e66a53812.