add client side file validation