                 logComplete job
                 mailbox.fetchFinished (error) ->
                     if error
-                        console.error "Check error...."
+                        mailbox.log "Check error..."
                     else
-                        console.log "Check successful !"
+                        mailbox.log "Check successful !"
 
             job.on 'failed', () ->
                 logFailed job
                 mailbox.fetchFailed (error) ->
-                    console.error "Mail check failed."
+                    mailbox.log "Mail check failed."
 
             job.on 'progress', (progress) ->
                 logProgress job, progress if progress isnt lastProgress

    
    Mailbox.find mailboxId, (error, mailbox) ->
        if error
            console.error "Check error.... The mailbox doesn't exist"
        else
            job = jobs.create "check mailbox",
                mailboxId: mailboxId


    Mailbox.find mailboxId, (error, mailbox) ->
        if error
            console.error "Import error... The mailbox doesn't exist"
        else
            mailbox.setupImport (error) ->
                if error
                    mailbox.importError ->
                        mailbox.log "Could not prepare the import. Aborting."
                else
                    createJobs mailbox, mailboxId
