console & from file mode for main