Added --debug flags

To address #531