account for file errors