Added support for -o and -e options