bug: errorfile was created after being assembled into pipe cmd