if os.stat(OUTPUT_FILE_PATH).st_size == 0: os.remove(OUTPUT_FILE_PATH) print('Output file is empty and has been deleted.')