Raise an exception if filename isn't valid (retry old version)