Handling both stdout and stderr and putting them in a sub-directory