removed a fwrite
removed double list_to_binary