Added options to isolate stdout or stderr only. Added documentation.