Added functions for collect files and syncing files