modify: filter out invalid filename