basic error output, need improving