Log javascript errors and stacktraces