Output errors to console.log properly