Logging is implemented

Debug traces for faulty and non-faulty cases have been added to be printed to stdout in case of Debug build.