Indeed this is correct but I guess the problem is not related with any of those libraries but rather with file I/O.
But in any case this is good idea to post it to another platform like askUbuntu…
Thanks any way…