fixed name truncation when adding to DB
removed loop to clean up path