I've written this code, but I can't pass the 3d and 4th requirements, i.e. I need to make sure the product list remains unchanged when you run the program without arguments, and when the program is run with the arguments "-c productName price quantity", a new line with the corresponding product should be added to the end of the file. I thought the line if (!args[0].equals("-c")) return; was enough to make sure nothing happens when there are no arguments or the arguments are different from what is expected. I probably misunderstand the task. For instance, I'm not really getting how I am supposed to follow this instruction: "Before adding a new line, re-write all of its contents to the file". To me, adding a line (to the file) equals to rewriting the contents of this line to the file. How can one be done before the other? Is that where my mistake is?