adding some changes
merging and update to last code version
fixing error page 500, need to call during plugin load