redirecting to logfile instead of using open3