Added function to auto execute the loader js