made the file access async at the beginning, making it much harder to read