in which I exterminate small bugs
added 'fileName' to decompose a filename into name and extension