handle invalid files