Set context to fix warning messages
Add check that foldermap entry exists