- Output to database done, need to figure out error on loop.