Refactored executable file methods to prevent recursion from causing stack overflows