Properly handle multiple files