refactor fs::realpath for trace mode
remove unused parentheses