fixed formatting error with jpg as output