added os compability(pathname had some troubles mixing windows/linux