writeStringToFile instead of write - did not help