args and dir validation