Format changes and added more logging