added error messages; code cleanup required in bookmark.js file