Update: Fixed core dump when giving 3 arguments instead of the usual 4 to the program.