write with no file name set should not crash