Added checksum_algorithm and filesize fields
Fix bug: misplaced return bypassed database updates