refactor smart ptr usage
change error handling in serializers

throw std::runtime_error if file is not opend