created progress bar before start loading, resolved problem with unclosed db