remove ^M and add __FILE__, __FUNCTION__, __LINE__