Only have error checking so far
Still very quick version of this; will make nicer version when I make full pipeline script