getFile is async, additional code needs to be placed within the function