comparator for pics
fixed logic error in comparing files