Add function to export flagged users to file.