removed stack trace printing
added logging mechanism