Now works with multiple files