fixed bug with failing to process multiple files