Fixed syntax errors

Redirection order
Ending with right parentheses