Added logic to sequence and simple.

Buggy with output file permissions.