Properly log error in github command