Fixed errors being unnoticed in SQL files containing multiple queries