manual deserialisation of library file