main() to handle multiple files