implemented a FIFO based on 2 files, one for input, the other for output

input works as expected: the files is read line by line, every line intepreted as a command
output kinda works, but not completely