Added batch file mode