Using args[] for opening files

Yes, that is correct.