bug fix file open mac and compile error gcc