Fix some PHP 5.4 Strict warnings :joy:
Show expected and actual mime type in log when an error occurs

issue #155