Fix relational path issue and suppress undefined warnings caused by an unexpected directory