Avoid invalid file errors