Fixed: The first run didn't work

Now using nested if statement in function main().
Added installation instructions