For functions that don't return anything, don't define the type as Unit. e.g. Just write

def createLogWriter(jobID: Int) {
 ...
}