Added error handling for fileref deletion
Merge branch 'fileref-deletion-errors'