             err.push "invalid file " + fileid + ": missing one of mandatory fields (name,path,type)"
             delete data[fileid]
 
-    # check mandatory files        
+    # check mandatory files
     _(MANDATORY_FILES).each (f) ->
         if data[f]?
             err = err.concat validate_file data[f], f
             delete data[f]
         else
-            err.push "missing attribute " + f   
+            err.push "missing attribute " + f
 
     # check optional files (attachments)
     _(data).each (property,fileid) -> delete data[fileid] if fileid.match /attachment\.\d+/i

                        name: dest_fname
                        path: dest_path
                        type: property_tmp.type
                        origname: property_tmp.name
                    cb null

    # run file move operations 
    async.series movefiles_func_arr, (err) ->
        return move_files_cb? err, null if err?


            delete data[f]
        else
            err.push "missing attribute " + f

    # check optional fields
    _(OPTIONAL_FIELDS).each (f) -> delete data[f] if data[f]?

    # check for unknown fields
    _(data).each (value,fieldname) -> err.push "unknown attribute " + fieldname

    err
