fix encoding and pass quiet argument