     maxSquare = 5000000  # ios max canvas square
     maxSize = 4096  # ie max canvas dimensions
 
-    do run = ->
+    run = ->
       if sW <= w
-        # console.log('draw: ' + (new Date() - start))
         df.resolve(img)
         return
 

        df.notify((originalW - sW) / (originalW - w))
        run()

    df.promise()

  ns.drawFileToCanvas = (file, mW, mH, bg, maxSource) ->
    # in -> file

    if img.width * step * img.height * step < settings.size
      return df.reject('not required')

    sW = originalW = img.width
    sH = img.height
    ratio = sW / sH
