Some additional changes
Some exception handling for corrupted images and make all filenames lowercase
fix merge conflict