Remove comments and log exception