Problem with my code is that every time when function importData prints string 'series' it's smaller for one character. For example:

AMSJETDZS
MEKDIEJF
SLEPDIE
NFELDE

and so on.

Declaring your series as char series[9+1] means that the series has room for strings up to 9 characters in length, but they can also be shorter. Probably your data file has shorter strings in them, which is why they are shorter than 9 characters. Without seeing the datafile or how you generated it it'd be hard to say.