Make sure to close fd before calling callbacks.