bug fix. file saving fails on unicode files.