synchronous file io