deal with unicode characters more robustly

better error messaging for missing files