addresses #2 with some logic for a file that does not exist
fixes #2 and moves group processing out into separate file