Moved static block to method to guarantee execution and fixed a path error