better error checking with missing psql