Added error handling of filesnames with non-ascii chars
handled all the errors. Ready to merge