Add nil checks before closing fifos to avoid panic when fifo was never opened. Signed-off-by: Cody Roseborough <crrosebo@amazon.com>