Formatting, remove useless check and values, move logging check to main, use errgo.v1