Connection class seperated from writeFile class