Fix bug not importing last record in file (XML/CSV), put ajax loading on importing dialogue