ensure that strncpy destination is null terminated (fixes #1), specify sscanf string lengths, close file at end of importdb(), remove unused variables