Bug fix - magic_load() should not be called if magic_open() failed.