imfile: adjust to 8.4.3 behaviour and some nitfixes