fix path handling in createPreloadedFile