I'd remove this whole error check and the log.Println(err) below on line 159.