Add proper error handling and tests for remote includes.