Refine the wrapper functions related to folder traversal.