Base: Wrap communication with OS in a function