Use threading instead of Timer to prevent block