Added check for existence of params.shared

Added check for existence of params.shared, callback in catch block