adapted test_filesystem.cpp