Fix js compile warnings
Improved galaxy export error handling