Raise an AzException on invalid filename