added support for console errors
using program with no switches throws an error