Add more logging to script compilation errors