better file separator handling