Add check for loaded SQL