inputstream usage for cross-platform file access