Fixed bug in error reporting
Changed deprecated loadstring to load