worked on error handling in save action