move tmpfile delete to proper place
version incremented to 0.4