     extractGpsFromBinary: (callback) ->
         kind = if @binary.raw then 'raw' else 'file'
         res  = @getBinary kind, (err) ->
-            console.log err if err?
+            log.error err if err?
 
         res.on 'ready', (stream) =>
             Helpers.readMetadata stream, (err, data) =>
                 if err?
-                    console.log err
+                    log.error "Error reading metadata of #{@id} / #{@title}"
+                    log.error err
                     callback()
                 else
                     @updateAttributes { gps: data.exif.gps }, (err) ->
-                        console.log err if err?
+                        log.error err if err?
                         callback() # ~ next()
 
 

            async.eachSeries binaries, (bin, cb) =>
                @removeBinary bin, (err) =>
                    if err
                        console.log """
                            Cannot destroy binary linked to photo #{@id}"""
                    cb()
            , (err) =>

async   = require 'async'
fs      = require 'fs'
Helpers = require '../helpers/thumb'
log     = require('printit')
    date: true
    prefix: "model:photo"

module.exports = class Photo extends cozydb.CozyModel
    @schema:
