improve progrssbar and signal handling