Newline on error added.
Error handling fixes.