@Cannadisco Hi mate your soil was obviously infected when you used it. and the flies are not a good sign.
It is Never really a good idea to bring soil thats been outdoors inside as it brings other unwanted things in with it.
What I would do is get some Diatomaceous Earth and sprinkle it all over the top of your soil you can also mix it with water and spray it on during the vegetative period. This stuff once contacted will kill bugs etc and is also a natural source of Silica which is benficial to your plants overall health. Another product is neem oil which will get rid of mites as well.
While your there water a tablespoon of epsom salts into your soil to add natural magnesium Hope this helps