output should be checked for errors