checks on more forks and dups, added some other checks, changed file permissions of outputs to 0x0666