Validating file and program name on the server side