First of all, I don't believe that "Error uploading file" is the full error message. So you have to provide the full one.
Next, you have to make sure apache has permission to write to (and to read from) "files/avatar" directory. Check README file that shipped with Mibew to get more info about required files permissions.