check write permission in work directory