implemented error/warning printing