moved parsing file extension list to a separate function