Improving error reporting from command line hack