According to https://www.tutorialspoint.com/c_standard_library/c_function_sprintf.htm
the length should be "BEFORE" the specifier
in the above function (In the win32 version) the following is formatted
Poco::format(err, "Error %ul while loading [%s]: [%s]", errn, path, trimmedError);
and it should be
Poco::format(err, "Error %lu while loading [%s]: [%s]", errn, path, trimmedError);