Test output to file added
Service loop in separate thread implemented