catch errors and pretty print usage