You are right, I didn't even look at your code close enough to see it requires arguments - two of them, third is optional.
First is path to the file. Second is flag (no idea what it does). Third is path to created output file.
First is path to the file. Second is flag (no idea what it does). Third is path to created output file.
Output:python main.py /path/to/file flag /path/to/output/is_optional