All functions take file descriptors as arguments