Fix for problem with missing directories
Make CHILD_STATUS available as global variable