Added check to not set the file if the param does not exist