Removed the tee command because it was causing issues.