file io and time fixes