Creating specific file listing function; Improving some other codes