add attribute validation for file mode