Do not use buffered writer, it seems to cause long timeouts