Wait for data to be written before closing connection

Also change all keep-alive to close in headers