improves file path handling