remove tasks from the file parmanently
changed logic to determine task type