changed to handle upper/lower case file names correctly