Fixed bugs in io.c and print_header.c