Replaced all printStackTrace by messages in error log.