Added -o flag for specifying output