Import functionality fixes

Hash checking and preventing same DB importing