Fix bugs and add choosing message file feature