fix function encode doesnot exist; add $schemaname to function
/var/lib/eligius --> $pooldatadir