made function to write bus schedule data to file