Added proper logging for every case but successful one.