Remove unnecessary directory traversal