Fixed error with stat command in startup scripts