Improved Error handling

updateLogs parses the log for the character '!'. However some warnings
also produce an '!' in the LaTeX log output.
Only checking for the response.errors.length makes sure that the pdf is
displayed if warnings occur.
Line is sliced multiple times

it is necessary to slice the line only one times the size of maxDocLine
for every loop circle.
Merge pull request #24 from murphy2/master

Fix for Issue #23 and more