Prevent script from hanging when no stdin is present