Remove format error and extra print statements