[update 1.0-1] check for both directory & file