Dump console when getting an error

@jypma