fixed basename() declaration check