lines_in_file with multiple extension support