sequentially process multiple files (thanks to Daniel Aleksandersen)