Print out errors based on close code