client side invalid file handling