print better error messages when invoked incorrectly