Added logic for validating signature images