updates to task logic checking for errors, cleanup of package json