Added exception handlers and logs
used sprintf in log messages
fixed cs with csfixer
Merge pull request #138 from geekhub-php/user-wrongavatar-fix2

[DONE] Fix user avatar exceptions, added logs