No-no-no. Of course I created this object. And suddenly I realized I have no logfile. So I started to cut my script to minimal reproducible size. And so I came to this minimal script you see here in the post.
My actual question was not about how to read from a serial port. I just wondering why its not writing to file when I use mentioned perl module.