improved filesystem static method