Moved loop to read outputs into writing process and uncommented serializer component to fix #46.