seems like we should output errors and warnings. may as well get all the messages? If so, would restructure this a bit.