Using absolutePath in static properly