Replace double underscores prefixes with single underscore
Fix warnig for const char ** after 5.6 stream ABI change
Add extra checks for empty ann and train_data