Added loop for multiple files