Further improvements with handling multiple files