Fixing insertion of null reference (file_links_id) to file_links: changed to reference 'files' tables instead.