fixed problem.  now I convert to a tempfile and then mv to the right location.  mv is atomic.  convert is not