Adding logging instead of printing stack traces. Also added logging
properties reader and fixed some try catches.