Fixed resource policy test and added log statements to debug builder issue