trying to save files in more OS-agnostic way