Library for capturing standard output and error of a process