Refs #58, adds error logging mechanism.