Move removal of build time artifacts to after server detection