API fixes for file IO
Changes from windows need to be integrated
Merge remote-tracking branch 'origin/master'