My implementation of cat command in C