fix check if workfile exists