server side file validation