add [] and move errors to stderr