Handling for invalid files. Progress indicators. And attempt to reduce m...

...emory usage.