Fix file characterisation skipping and remove unused function