If a file name has multiple periods in it, PixInsight is unable to open it.
One example of such a file name is "DO Dra V.12345.11h43m48.04s,-71d41m20s.FIT"
PixInsight apparently looks for the first period to find the file extension instead of the last, and then says it does not have a handler that knows how to open files of type ".12345.11h43m48.04s,-71d41m20s.FIT".
If the file is renamed such that only the last period is part of the file name, it will open it successfully.
Perhaps use strrchr/rindex to find the last period in the file name?
Thorsten