Add file-handling functions for Unix